import Gamelis from '../views/Gamelis'
import About from '../views/About'
import News from '../views/News.vue'
import PerCen from '../views/PerCen.vue'
import Sell from '../views/Sell.vue'
import Index from '../views/First.vue'
import GameDtail from '../components/GameDtail'
import Release from '../views/Release'
import Trade from '../views/Trade'
import store from '../store'

export default [
        {
            path:'/',
            component:About,
            children:[
                {
                    path:'/',
                    component:Index
                },
                {
                    path:'list',
                    component:Gamelis,
                },
                {
                    path:'release',
                    component:Release,
                },
                {
                    path:'trade',
                    component:Trade,
                },
                
                {
                    path:'/news',
                    component:News
                },
                {
                    path:'/sell',
                    component:Sell
                },
                {
                    path: '/percen',
                    component: PerCen,
                    beforeEnter: (to, from, next) => {
                        store.dispatch('percen/settingAction')
                        next()
                    }
                },
            ]
        },
        {
            path:'/detail/:m/:n',
            component:GameDtail,
        },
        
        
]